package com.ruoyi.sync;

import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.CompletableFuture;

@Service
public class AsyncService {

    @Async("taskExecutor")
    public void orderPay1() {
        try {
            Thread.sleep(5000);
            System.out.println("orderPay1");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
